package com.hoas.quickstart.threads.chapter02.chapter02_3_6;

import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

public class MyService {

    public static AtomicLong aiRef = new AtomicLong();

    public void addNum() {

        System.out.println(Thread.currentThread().getName() + " 加了100之后的值是："
            + aiRef.addAndGet(100));

        aiRef.addAndGet(1);

    }

}
